<div id="header">
	<a id="logo" title="首页" href="/"></a>
	<ul id="navigation">
		<% if logged_in?%>
		<li><a title="关注" href="/follow"><span class="nav">关注</span></a></li>
		<% end%>
		<li><a title="最新" href="/all"><span class="nav">最新</span></a></li>
		<li><a title="热门" href="/popular"><span class="nav">热门</span></a></li>
		<li class="submenu">
        	<a href="#">
        		<span class="nav">
        			<%= show_category_name%><span></span>
				</span>
			</a>
            <ul id="categoriesDropdown">
                <li><%= show_category%></li>
            </ul>
		</li>
	</ul>
	<div id="search">
		<!--
		<form class="text" method="get" action="/search">
			<a id="query_button" class="lg" href="#">
				<img alt="" src="/images/search.gif">
			</a>
		</form>
		-->
		<% form_tag "/search", :method => "get", :id => "search_form", :class => "text" do-%>
			<input id="query" type="text" placeholder="搜索你喜欢的" value="<%= params[:q]%>" size="27" name="q" />
			<a class="lg" onclick="$('search_form').submit();return false;" href="#">
				<img alt="" src="/images/search.gif">
			</a>
		<% end%>
	</div>
	<% if logged_in?%>
	<ul id="menu_bar">
		<li class="usermenu">
			<a href="/user/account/<%= current_user.id%>">
				<span class="nav">
					<%= current_user.login%>
					<!--<img alt="img" src="https://s-media-cache-ec9.pinimg.com/avatars/winseed-1345193545.jpg">-->
				</span>
				<!--<span></span>-->
			</a>
            <ul id="usermenuDropdown">
            	<li class="beforeDivider">
            		<a href="/user/account/<%= current_user.id%>">我的采集</a>
            	</li>
                <li class="divider">
                    <a href="/about/goodies/">采集工具</a>
                </li>
                <li>
                    <a href="/about/help">关于&帮助</a>
                </li>
				<li>
					<a href="/about/">用户反馈</a>
				</li>
				<li class="beforeDivider">
					<a href="/about/links">友情链接</a>
				</li>
                <li class="divider">
                    <a href="/user/setting/">账号设置</a>
                </li>
                <li>
                    <a href="/user/logout/">退出登录</a>
                </li>
            </ul>
		</li>
	</ul>
	<% else%>
	<ul id="menu_bar">
		<li class="usermenu">
			<a href="/user/login"><span class="nav">登录</span></a>
            <ul id="usermenuDropdown">
                <li>
                    <a href="/about/goodies/">采集工具</a>
                </li>
                <li>
                    <a href="/about/help">关于&帮助</a>
                </li>
				<li>
					<a href="/about/">用户反馈</a>
				</li>
				<li class="beforeDivider">
					<a href="/about/links">友情链接</a>
				</li>
				<li class="divider">
                    <a href="/user/login/">登录</a>
                </li>
                <li>
                    <a href="/user/signup/">注册账号</a>
                </li>
            </ul>
		</li>
	</ul>
	<% end%>
</div>









